package com.ktgj.flight.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.flight.mapper.CabinruleMapper;
import com.ktgj.flight.domain.Cabinrule;
import com.ktgj.flight.service.ICabinruleService;

/**
 * 舱位退改签Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-30
 */
@Service
public class CabinruleServiceImpl implements ICabinruleService 
{
    @Autowired
    private CabinruleMapper cabinruleMapper;

    /**
     * 查询舱位退改签
     * 
     * @param ruleid 舱位退改签ID
     * @return 舱位退改签
     */
    @Override
    public Cabinrule selectCabinruleById(Long ruleid)
    {
        return cabinruleMapper.selectCabinruleById(ruleid);
    }

    /**
     * 查询舱位退改签列表
     * 
     * @param cabinrule 舱位退改签
     * @return 舱位退改签
     */
    @Override
    public List<Cabinrule> selectCabinruleList(Cabinrule cabinrule)
    {
        return cabinruleMapper.selectCabinruleList(cabinrule);
    }

    /**
     * 新增舱位退改签
     * 
     * @param cabinrule 舱位退改签
     * @return 结果
     */
    @Override
    public int insertCabinrule(Cabinrule cabinrule)
    {
        cabinrule.setCreateTime(DateUtils.getNowDate());
        return cabinruleMapper.insertCabinrule(cabinrule);
    }

    /**
     * 修改舱位退改签
     * 
     * @param cabinrule 舱位退改签
     * @return 结果
     */
    @Override
    public int updateCabinrule(Cabinrule cabinrule)
    {
        return cabinruleMapper.updateCabinrule(cabinrule);
    }

    /**
     * 批量删除舱位退改签
     * 
     * @param ruleids 需要删除的舱位退改签ID
     * @return 结果
     */
    @Override
    public int deleteCabinruleByIds(Long[] ruleids)
    {
        return cabinruleMapper.deleteCabinruleByIds(ruleids);
    }

    /**
     * 逻辑删除舱位退改签信息
     * 
     * @param ruleid 舱位退改签ID
     * @return 结果
     */
    @Override
    public int deleteCabinruleById(Long ruleid)
    {
        return cabinruleMapper.deleteCabinruleById(ruleid);
    }
}
